from odoo import api, models, fields


class UserComments(models.Model):
    _name = 'user.comments'
    _description = '面试官的评语'
    guest_id = fields.Many2one(
        'stu.info',
        string=u"面试人"
    )
    operator_uid = fields.Many2one(
        string=u"面试官的姓名",
        # readonly=True,
        comodel_name='res.users',
        default=lambda self: self.env.uid
    )
    opinion = fields.Html(
        '面试官的建议',
    )


class UserSuccess(models.Model):
    _name = 'user.success'
    _description = '面试官的评语(通过)'
    guest_id = fields.Many2one(
        'stu.success',
        string=u"面试人"
    )
    operator_uid = fields.Many2one(
        string=u"面试官的姓名",
        #   readonly=True,
        comodel_name='res.users',
        default=lambda self: self.env.uid
    )
    opinion = fields.Html(
        '面试官的建议',
    )
